<?php

abstract class Light_Router_Route_Abstract implements Light_Router_Route_Interface
{
    /**
     * URI delimiter
     */
    const URI_DELIMITER = '/';

    /**
     * Path matched by this route
     *
     * @var string
     */
    protected $_matchedPath = null;

    /**
     * Get the version of the route
     *
     * @return integer
     */
    public function getVersion()
    {
        return 2;
    }

    /**
     * Set partially matched path
     *
     * @param  string $path
     * @return void
     */
    public function setMatchedPath($path)
    {
        $this->_matchedPath = $path;
    }

    /**
     * Get partially matched path
     *
     * @return string
     */
    public function getMatchedPath()
    {
        return $this->_matchedPath;
    }

    /**
     * Create a new chain
     *
     * @param  Light_Router_Route_Abstract $route
     * @param  string                                $separator
     * @return Light_Router_Route_Chain
     */
    public function chain(Light_Router_Route_Abstract $route, $separator = '/')
    {
        $chain = new Light_Router_Route_Chain();
        $chain->chain($this)->chain($route, $separator);
        return $chain;
    }
}